
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <ul class="sidebar-menu">
            <li class="header">欢迎</li>
            <li class="active treeview">
                <a href="#">
                    <i class="fa fa-user"></i> <span>用户</span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li class="active"><a href="index.php?p=pipe_user"><i class="fa fa-circle-o"></i>渠道用户</a></li>
                    <li class=""><a href="index.php?p=admin_user"><i class="fa fa-circle-o"></i>后台用户</a></li>
                </ul>
            </li>
            <li class=" treeview">
                <a href="#">
                    <i class="fa fa-cube"></i> <span>产品</span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li class=""><a href="index.php?p=product_mani"><i class="fa fa-circle-o"></i>产品管理</a></li>
                </ul>
            </li>
            <li class=" treeview">
                <a href="#">
                    <i class="fa fa-database"></i> <span>数据</span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li class=""><a href="index.php?p=data_mani"><i class="fa fa-circle-o"></i>列表</a></li>
                </ul>
            </li>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>
<!-- Main content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            用户
            <small>渠道</small>
            <a class="btn btn-primary pull-right" id="add-pipe-btn">
                新增渠道
            </a>
        </h1>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body">
                        <table id="pipe-table" class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>渠道名称</th>
                                <th>渠道类型</th>
                                <th>单价</th>
                                <th>结算</th>
                                <th>产品名称</th>
                                <th>渠道用户名</th>
                                <th>渠道密码</th>
                                <th>公司名称</th>
                                <th>公司地址</th>
                                <th>联系姓名</th>
                                <th>联系电话</th>
                                <th>编辑</th>
                            </tr>
                            </thead>
                            <tbody id="pipeTable">

                            </tbody>
                        </table>
                    </div><!-- /.box-body -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.row -->
        <div class="row">
            <div class="col-xs-6">
                <nav>
                    <ul class="pagination">
                        <li>
                            <a href="#" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li><a href="#">1</a></li>
                        <li>
                            <a href="#" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
        <div class="pipe-edit-modal">
            <div class="modal">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                            <h4 class="modal-title">新渠道</h4>
                        </div>
                        <div class="modal-body">
                            <form class="form">
                                <div class="form-group">
                                    <label class="form-group" for="">渠道名称:</label>
                                    <input type="text" class="form-group pipe-name">
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">渠道类型:</label>
                                    <select class="form-group pipe-type">
                                        <option  selected="true" disabled="true">请选择</option>
                                        <option value="0">cpa</option>
                                        <option value="1">cps</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">单价:</label>
                                    <input class="form-group unit-price" type="text">
                                </div>
                                <div class="form-group typediff">
                                    <label class="form-group" for="">结算周期:</label>
                                    <select class="form-group clear-cycle">
                                        <option value="周">周</option>
                                        <option value="双周">双周</option>
                                        <option value="月">月</option>
                                        <option value="季度">季度</option>
                                        <option value="年">年</option>
                                    </select>
                                </div>
                                <div class="form-group typediff">
                                    <label class="form-group" for="">结算比例:</label>
                                    <input type="text" class="form-group clear-cycle">
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">产品名称:</label>
                                    <select class="form-group product-name">
                                        <?php
                                             $rows=$mysql->query("select * from `product`");
                                            foreach($rows as $row){
                                                echo "<option value='".$row['name']."'>".$row['name']."</option>";
                                            }

                                        ?>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">渠道登陆账号:</label>
                                    <input class="form-group pipe-username" type="text">
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">渠道登陆密码:</label>
                                    <input class="form-group pipe-pass" type="text">
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">公司名称:</label>
                                    <input class="form-group company-name" type="text">
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">公司地址:</label>
                                    <input class="form-group company-address" type="text">
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">联系人姓名:</label>
                                    <input class="form-group contact-name" type="text">
                                </div>
                                <div class="form-group">
                                    <label class="form-group" for="">联系人电话:</label>
                                    <input class="form-group contact-tel" type="text">
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
                            <button type="button" class="btn btn-primary">Save changes</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div><!-- /.modal -->
        </div>
        <div class="product-modal-cover"></div>
    </section><!-- /.content -->
</div>

<div class="modal pipe-edit-model">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close video-edit-model-close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">修改渠道</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">

                    <div class="form-group">
                        <label for="update_pipe_name" class="col-sm-2 control-label">渠道名称</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_pipe_name"
                                   placeholder="无">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="update_pipe_type" class="col-sm-2 control-label">渠道类型</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_pipe_type"
                                   placeholder="无">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_unit_price" class="col-sm-2 control-label">渠道单价</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_unit_price"
                                   placeholder="无">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_clear_cycle" class="col-sm-2 control-label">结算</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_clear_cycle"
                                   placeholder="无内容">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_product_name" class="col-sm-2 control-label">产品名称</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_product_name"
                                   placeholder="无">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_pipe_username" class="col-sm-2 control-label">渠道登陆用户名</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_pipe_username"
                                   placeholder="无">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_pipe_pass" class="col-sm-2 control-label">渠道登陆密码</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_pipe_pass"
                                   placeholder="无">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default pull-left pipe-edit-model-close" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary update-pipe">保存修改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

